package demo1217.fuxi;

public class Demo_03 {
    public static void main(String[] args) {
        String s = new String("123");//创建几个对象? 2个
        String s1 = "helloworld";
        String s2 = "hello" + "world";//编译期"helloworld"
        String s3 = "hello";
        String s4 = s3 + "world";//new String ("helloworld");
        System.out.println(s1 == s2);//true
        System.out.println(s1 == s4);//false
        System.out.println(s2 == s4);//false
    }
}
